//
//  WJBelowCollectionViewCell.m
//  WJBSApp
//
//  Created by dllo on 16/7/18.
//  Copyright © 2016年 王景伟. All rights reserved.
//

#import "WJBelowCollectionViewCell.h"

@interface WJBelowCollectionViewCell ()

@property (nonatomic,retain) UILabel *lable;

@end

@implementation WJBelowCollectionViewCell
-(void)dealloc
{
    [_lablel release];
    [_sliderLable release];
    [_lable release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.lablel = [[WJBaseLable alloc]init];
        [self.contentView addSubview:self.lablel];
        self.lablel.font = [UIFont systemFontOfSize:14];
        self.lablel.textAlignment = NSTextAlignmentCenter;
        [_lablel release];
        
        self.sliderLable = [[UILabel alloc]init];
        [self.contentView addSubview:self.sliderLable];
        self.sliderLable.backgroundColor = [UIColor redColor];
        self.sliderLable.hidden = YES;
        [_sliderLable release];
        
        self.lable = [[UILabel alloc]init];
        [self.contentView addSubview:self.lable];
        self.lable.backgroundColor = [UIColor lightGrayColor];
        [_lable release];
        
    }
    return self;
}


- (void)layoutSubviews
{
    NSDictionary *dic = @{NSFontAttributeName:[UIFont systemFontOfSize:17]};
    
    CGRect rect = [self.lablel.text boundingRectWithSize:CGSizeMake(1000, 40) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    
    self.lablel.frame = CGRectMake(10, 0, rect.size.width , 37);
    
    self.sliderLable.frame = CGRectMake(10, 37,rect.size.width, 3);
    
    self.lable.frame = CGRectMake(0, 39, WIDTH, 1);
    
}








@end
